<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-10-15 16:11:57
 * @LastEditTime: 2019-10-15 19:35:36
 * @LastEditors: Please set LastEditors
 -->
<template>
  <div id="app">
    <preview :objstyle="objStyle" :datas="datas" :item-data="itemData" @get-img="getImg"></preview>
  </div>
</template>

<script>
  import preview from './plugin/index.vue'

  const objStyle = {
      margin: "100px auto"
    },
    datas = {},
    itemData = {}

  export default {
    name: 'app',
    data() {
      return {
        objStyle,
        datas,
        itemData
      }
    },
    components: {
      preview
    },
    methods: {
      getImg(data) {
        console.log('data', data)
        this.datas = {
          "001.png": [0, 20],
          "002.png": [20, 40],
          "003.png": [40, 60],
          "004.png": [60, 80],
          "005.png": [80, 100],
          "006.png": [100, 120],
          "007.png": [120, 140],
          "008.png": [140, 160],
          "009.png": [160, 180],
          "0010.png": [180, 200],
        }
      }
    }
  }

</script>

<style lang="scss">
  * {
    margin: 0;
    padding: 0
  }

</style>
